home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 21 code / MPW Tips - Faster Launch / Startup < prev    next >
Encoding:
Text File  |  1995-01-16  |  741 b   |  31 lines  |  [TEXT/MPS ]

  1. # Restore the state if possible; else cold boot.
  2. # ∑∑ means redirect to end of file.
  3. If "`Exists "{ShellDirectory}MPW.SuspendState"`"
  4.     Execute "{ShellDirectory}MPW.SuspendState" ∂
  5.         ∑∑ "{Worksheet}"
  6.     Set ColdBoot 0
  7. Else
  8.     Beep 2g,3 2f,3 2a,3    # Hum a merry tune
  9.     Begin
  10.         Echo "MPW.SuspendState was not found."
  11.         Echo "Here's your Cold Boot…"
  12.     End ∑∑ "{Worksheet}"
  13.     Execute "{ShellDirectory}ColdStartup"
  14.     Set ColdBoot 1
  15. End
  16.  
  17. Export ColdBoot
  18.  
  19. # Do anything that needs doing each launch
  20. # (UserStartup•X files in EachBoot folder).
  21. If "`Exists -d "{ShellDirectory}EachBoot"`"
  22.     For fileName in ∂
  23.         `(Files ∂
  24.         "{ShellDirectory}"EachBoot:UserStartup•≈ ∂
  25.             || Set Status 0) ≥ Dev:Null`
  26.         Execute "{fileName}"
  27.     End
  28.     Unset fileName
  29. End
  30. Unset ColdBoot
  31.